home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / cbuket / compress.frm < prev    next >
Text File  |  1994-10-07  |  3KB  |  104 lines

  1. VERSION 2.00
  2. Begin Form CompressBucket 
  3.    BorderStyle     =   0  'None
  4.    ClientHeight    =   810
  5.    ClientLeft      =   1245
  6.    ClientTop       =   1605
  7.    ClientWidth     =   810
  8.    ControlBox      =   0   'False
  9.    Height          =   1275
  10.    Icon            =   COMPRESS.FRX:0000
  11.    Left            =   1155
  12.    LinkTopic       =   "Form1"
  13.    MaxButton       =   0   'False
  14.    MinButton       =   0   'False
  15.    ScaleHeight     =   810
  16.    ScaleWidth      =   810
  17.    Top             =   1230
  18.    Width           =   990
  19.    Begin PictureBox Picture1 
  20.       AutoSize        =   -1  'True
  21.       BorderStyle     =   0  'None
  22.       Height          =   390
  23.       Left            =   0
  24.       Picture         =   COMPRESS.FRX:0302
  25.       ScaleHeight     =   390
  26.       ScaleWidth      =   315
  27.       TabIndex        =   0
  28.       Top             =   0
  29.       Width           =   315
  30.    End
  31.    Begin DragDrop DragDrop1 
  32.       Left            =   360
  33.       Top             =   420
  34.    End
  35. End
  36.  
  37. Sub DragDrop1_Drop (PointX As Long, PointY As Long)
  38.  
  39. Dim PosFlag%
  40. Dim TempFile$
  41. Dim DragItem$
  42. Dim DropIndex%
  43.  
  44.      msg$ = "We're handling files Asynchronously."
  45.      msg$ = msg$ & Chr$(10) & Chr$(13) & Chr$(10) & Chr$(13)
  46.      msg$ = msg$ & "Wait for all DOS icons to close before "
  47.      msg$ = msg$ & "clicking on the bucket to close it, as "
  48.      msg$ = msg$ & "there may still be files "
  49.      msg$ = msg$ & "in the active queue."
  50.      msg$ = msg$ & Chr$(10) & Chr$(13) & Chr$(10) & Chr$(13)
  51.      msg$ = msg$ & "Total system memory will determine "
  52.      msg$ = msg$ & "how many files can be processed.  We suggest a "
  53.      msg$ = msg$ & "maximum of 20."
  54.      
  55.      response% = MsgBox(msg$, 49, "Multi-File Processing")
  56.      If response% = 2 Then Exit Sub
  57.  
  58.      nf% = DragDrop1.FileCount
  59.      For i% = 0 To nf% - 1
  60.       WorkFile = Trim$(DragDrop1.FileName(DropIndex%))
  61.       For n% = 1 To Len(WorkFile)
  62.            char$ = Mid$(WorkFile, n%, 1)
  63.            If char$ = "\" Then
  64.             PosFlag% = n%
  65.             End If
  66.           Next n%
  67.       DragItem$ = Right$(WorkFile, (Len(WorkFile) - PosFlag%))
  68.       TempFile$ = Left$(Trim$(DragItem$), Len(DragItem$) - 1)
  69.       CompFile = TempFile$ & "_"
  70.       X% = Shell("maksmall.pif " & WorkFile & " " & WorkingDir & "\compress\" & CompFile, 2)
  71.     
  72.     ' removing the rems from the following
  73.     ' will cause compression to be executed
  74.     ' synchronous, rather than asynchronous
  75.     
  76.     '  While GetModuleUsage(X%) > 0
  77.     '       z% = DoEvents()
  78.     '       Wend
  79.  
  80.       DropIndex% = DropIndex% + 1
  81.       Next i%
  82.  
  83. End Sub
  84.  
  85. Sub Form_Click ()
  86.      End
  87. End Sub
  88.  
  89. Sub Form_Load ()
  90.  
  91.      left = screen.Width - 1000
  92.      top = screen.Height - 1000
  93.      Width = picture1.Width
  94.      Height = picture1.Height
  95.      
  96.      SetWindowPos CompressBucket.hWnd, HWND_TOPMOST, 0, 0, 0, 0, &H40
  97.  
  98. End Sub
  99.  
  100. Sub Picture1_Click ()
  101.      End
  102. End Sub
  103.  
  104.